package factory

import java.util.function.{Consumer, Predicate}

import dto.req.{NotifyReqDTO, RefundOrderReqDTO}
import dto.resp.RefundOrderRespDTO

trait RefundAction {

  def checkParams[T <: RefundOrderReqDTO](req: T): Unit

  def refundTransaction(req: RefundOrderReqDTO, consumer:Consumer[RefundOrderReqDTO]): Unit

  @throws[Exception]
  def refund[T <: RefundOrderReqDTO, R >: RefundOrderRespDTO](req: T): R

  @throws[Exception]
  def callback(req: NotifyReqDTO,  predicate: Predicate[NotifyReqDTO]): Boolean

  def setProperties(bizCode: String): Unit

  def getPayChannel: Integer

}
